l206/visual studio code/7juni.html
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.onload = eventRegelen;
function eventRegelen(){
var imgArray = document.getElementByTagName('img')
for(i-0; i<imgArray.length; i++){
imgArray[i].onclick = randzwart;
}
function randzwart(){
this.style.border ="solid 2px black";
}
}
</script>
<title>Document</title>
</head>
<body>
<p><img src="images/Naamloos.png" alt="naamloos.png"></p>
<p></p><img src="images/Naamloos2.png" alt="naamloos2.png"></p>
<p></p><img src="images/1491253396-5document-image_82883.png" alt="naamloos3.png"></p>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse